package cn.kgc.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/2/17
 * @Description:
 */
@Configuration
public class BeanConfig {

    @Bean
    @LoadBalanced  // 标识RestTemplate 具有负载均衡能力
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }

}
